home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19981211-19990422 / 000025_news@newsmaster….columbia.edu _Fri Dec 18 11:47:43 1998.msg < prev    next >
Internet Message Format  |  2020-01-01  |  4KB

  1. Return-Path: <news@newsmaster.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id LAA29638
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Fri, 18 Dec 1998 11:47:42 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id LAA29085
  7.     for kermit.misc@watsun; Fri, 18 Dec 1998 11:47:42 -0500 (EST)
  8. Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Newsgroups: comp.protocols.kermit.misc
  11. Subject: Re: receiving straight binary
  12. Date: 18 Dec 1998 16:47:41 GMT
  13. Organization: Columbia University
  14. Lines: 61
  15. Message-ID: <75e0vd$74n$1@apakabar.cc.columbia.edu>
  16. References: <gerlachF4602I.IDE@netcom.com> <75dsph$4i1$1@apakabar.cc.columbia.edu> <gerlachF46656.2yF@netcom.com>
  17. NNTP-Posting-Host: watsun.cc.columbia.edu
  18. Xref: news.columbia.edu comp.protocols.kermit.misc:9657
  19.  
  20. In article <gerlachF46656.2yF@netcom.com>,
  21. Matthew H. Gerlach <gerlach@netcom.com> wrote:
  22. : In article <75dsph$4i1$1@apakabar.cc.columbia.edu> fdc@watsun.cc.columbia.edu (Frank da Cruz) writes:
  23. : >In article <gerlachF4602I.IDE@netcom.com>,
  24. : >Matthew H. Gerlach <gerlach@netcom.com> wrote:
  25. : >: I have a device that spits out raw binary serial data, and I want it to
  26. : >: go to a harddrive.  I'm using 6.1.193 Beta.05 on a Solaris machine.  What
  27. : >: I did was write a small program that reads stdin and writes it to a file.
  28. : >: I then used the ckermit "redirect" command to run my program attaching
  29. : >: the serial input stream to my program's stdin.
  30. : >: 
  31. : >: I'm sure there is a better way to do this, but I'm not sure what that
  32. : >: better way is.  I have written scripts using the "input" command that
  33. : >: does the same thing for ascii text, but I'm not sure it would work too
  34. : >: well in the this case.
  35. : >: 
  36. : >There's no reason why it shouldn't:
  37. : >
  38. : >  set line /dev/tty0 ; or whatever
  39. : >  set speed 19200    ; or whatever
  40. : >  set parity none
  41. : >  set flow rts/cts   ; or none -- not xon/xoff
  42. : >  set session-log binary
  43. : >  set terminal byte 8
  44. : >  set terminal character-set transparent
  45. : >  log session
  46. : >  input 9999 termination-sequence
  47. : >  close session
  48. : >
  49. : >The trick is to know when to stop logging, but you must have had some
  50. : >criterion in your stdin/stdout program so you should be able to use the
  51. : >same one here.
  52. : >
  53. : >- Frank
  54. : The termination criteria is the trick.  Currently, my stdin/stdout program
  55. : has no "stopping criteria".  It stops when I signal it.  From the "input"
  56. : command's point of view, the data stream is random; so there is no
  57. : pattern to "look for".  I just want to "input" the bytes and log them.
  58. : For the record, the data stream is a Mu-law encoded audio stream.
  59. : Thinking about this more.  What I have is a burst of data coming out of the 
  60. : device.  So a convenient script would wait a certain amount of time
  61. : for anything to come over the wire, log it, and when there is large pause
  62. : in the data stream, say a second or so, it would stop.
  63. : Looking at the "input" command in the manual some more, if I just give
  64. : it a timeout and no text it will wait for any single character.  I suppose
  65. : this would work, but I'm running at 115k, and it seems "input"ing 
  66. : single characters might be rather expensive processing-wise.
  67. : Matthew
  68. :
  69. Yes, that would be expensive.
  70.  
  71. How about this:
  72.  
  73.   SET INPUT SILENCE 60  ; Make INPUT time out after 60 seconds of silence
  74.   INPUT 9999 string-that-will-never-come
  75.  
  76. - Frank